<template>
  <div class="header">
    <div class="header-left"><span class="iconfont icon-fanhui"></span></div>
    <div class="header-input"><input type="text" placeholder="输入城市景点">
      </div>
    <div class="header-right">
      <router-link to="/city">
        {{ this.city }}<span class="iconfont icon-xiajiantou"></span>
      </router-link>
    </div>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'HomeHeader',
  computed: {
    ...mapState({
      city: (state) => state.city.city
    })
  },

  data() {
    return {}
  },

  mounted() {},

  methods: {}
}
</script>

<style lang="less" scoped>
.header {
  display: flex;
  height: 1.1467rem;
  background: #00bcd4;
  color: #fff;
  line-height: 1.1467rem;

  .header-left {
    width: 0.8533rem;
    float: left;
  }
  .header-right {
    padding-left: 0.2rem;
    float: right;
    text-align: center;
    a {
      color: #fff;
    }
  }

  .header-input {
    text-align: center;
    color: #ccc;
    flex: 1;
    background: #fff;
    border-radius: 0.1333rem;
    height: 0.8533rem;
    line-height: 0.8533rem;
    margin-top: 0.15rem;
  }
  .icon-fanhui {
    font-size: 0.5rem;
  }
}
</style>
